cmake_minimum_required(VERSION 3.27)
project(LearnOpenGl04)

set(CMAKE_CXX_STANDARD 17)
     
#往项目中加入一个全局的预编译宏
add_definitions(-DDEBUG)
   
#不加双引号copy不过去，天坑
file(GLOB ASSETS "${CMAKE_CURRENT_SOURCE_DIR}/src/assets")
file(COPY ${ASSETS} DESTINATION ${CMAKE_BINARY_DIR})

INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/include)


LINK_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/lib)

#add_subdirectory要在INCLUDE_DIRECTORIES之后
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/wrapper)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/glframework)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/application)


add_executable(opengl_demo src/main.cpp src/glad.c )

target_link_libraries(opengl_demo glfw3.dll wrapper app glframework)